<?php
/**
 * Copyright (c) 2006-2008, Julien PORTALIER
 * http://featherphp.googlecode.com/
 * 
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 */

/**
 * Generic controller for scripts.
 */
abstract class ScriptController extends Controller
{
	function __construct($action='main', array $args=null)
	{
		$this->name   = str_replace('Script', '', get_class($this));
		$this->action = $action;
		$this->load   = new Load($this);
		
		# callbacks
#		$this->bind_callback('before_action');
#		$this->bind_callback('after_action');
#		$this->bind_callback('before_render');
#		$this->bind_callback('after_render');
		
		View::__construct();
	}
	
	/**
	 * Main function for scripts.
	 */
	abstract function main();
}
?>